<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/6/29
 * Time: 17:38
 */
namespace app\api\validate;

use think\Validate;

class Insurance extends Validate
{
    protected $rule = [
        'idcard' => 'require',
        'style' => 'require',
        'code'=>'require',
        'enginecode'=>'require',
        'register'=>'require',
        'owenername'=>'require',
        'licensePath'=>'require',
        'billPath'=>'require',
        'replacement'=>'require',
        'email'=>'require|email',
        'city'=>'require',
        'ownerphone'=>'mobile|require'
    ];

    protected $message = [
        'idcard.require' => '缺少身份证',
        'style.require' => '缺少品牌型号',
        'code.require' => '缺少车辆识别码',
        'enginecode.require' => '缺少发动机识别码',
        'register.require' => '缺少注册日期',
        'owenername.require'=>'缺少车主姓名',
        'licensePath.require'=>'缺少驾驶证照片',
        'billPath.require'=>'缺少发票照片',
        'replacement.require'=>'缺少排量',
        'email.require'=>'缺少邮箱',
        'email.email'=>'邮箱格式不正确',
        'city.require'=>'缺少城市',
        'ownerphone.require'=>'缺少车主手机',
        'ownerphone.mobile'=>'车主手机格式不正确',
    ];
}
